package a02_staticStudent;

import java.util.ArrayList;

/**
 * @Author quan
 * @Description 测试类
 * @Date 2023/1/24 23:39
 */
public class TestDemo {
    public static void main(String[] args) {
        //(1)创建一个集合存储学生内容
        ArrayList<Student> list = new ArrayList<>();
        //(2)创建三个学生对象
        Student stu1 = new Student("one",23,"女");
        Student stu2 = new Student("two",13,"男");
        Student stu3 = new Student("three",24,"女");

        //(3)把学生对象添加到集合中
        list.add(stu1);
        list.add(stu2);
        list.add(stu3);

        //(4)调用工具类中的方法
        int maxAgeStudent = StudentUtil.getMaxAvgStudent(list);
        System.out.println(maxAgeStudent);
    }
}
